﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Main.ascx.cs" Inherits="Main" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register assembly="MSCaptcha" namespace="MSCaptcha" tagprefix="cc1" %>

<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Charting" tagprefix="telerik" %>
<style type="text/css">
    .style1
    {
        width: 325px;
    }
    .style2
    {
        height: 23px;
    }
    .style3
    {
        width: 325px;
        height: 23px;
    }
</style>
<br />
<asp:Label ID="LblHeader" runat="server" Text="Đăng nhập" CssClass="labelHeader"></asp:Label>
<hr />
    <div style="margin-top:15px;margin-left:260px;">
        <table >
            <tr>
			    <td align="right" style="width:120px">
                    <asp:Label runat="server" ID="lblUserName" CssClass="label" Text="Tên đăng nhập"></asp:Label>&nbsp;
                </td>
                <td class="style1">
                    <telerik:RadTextBox ID="txtUserName" Runat="server" Width="180px">
                    </telerik:RadTextBox>
                <asp:RequiredFieldValidator ID="validateUserName" runat="server" 
                    ControlToValidate = "txtUserName"
                    Display="Static"  ValidationGroup="login"
                    ErrorMessage = "*"
                    ForeColor="Red"
                    Enabled="true">
                </asp:RequiredFieldValidator>
                </td>
		    </tr>
            <tr>
			    <td align="right" style="width:120px">
                    <asp:Label runat="server" ID="lblPassword"  CssClass="label" Text="Mật khẩu"></asp:Label>&nbsp;
                </td>
                <td class="style1"> 
                    <telerik:RadTextBox ID="txtPassword" Runat="server" Width="180px" 
                        TextMode="Password">
                    </telerik:RadTextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate = "txtPassword"
                    Display="Static"  ValidationGroup="login"
                    ErrorMessage = "*"
                    ForeColor="Red"
                    Enabled="true">
                </asp:RequiredFieldValidator>
                </td>
		    </tr>
            <tr>
            <td></td>
            <td class="style1">
                <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
                <telerik:RadCaptcha ID="RadCaptcha" Runat="server"  ValidationGroup="login" 
                    ForeColor="#FF0066" BorderStyle="None" CaptchaTextBoxLabel="" ErrorMessage="Mã xác nhận không đúng" 
                    >
                </telerik:RadCaptcha>
                </td>
            </tr>
            <tr>
			    <td>&nbsp;</td>
                <td align="left" class="style1"> 
                    <asp:Label ID="lblFailure" runat="server" ForeColor="Red"></asp:Label>
                    
                </td>
		    </tr>
            <tr>
			    <td></td>
                <td align="left" class="style1"> 
                    <asp:Button runat="server" ID="btnOk" CssClass="button" ValidationGroup="login" 
                        OnClick="btnOK_Authenticate" Text="Đăng nhập"  
                        />
                    
                </td>
		    </tr>
            <tr>
            <td></td>
            <td align="left" class="style1"> 
            <a href="/Default2.aspx" style="margin-left:10px; color:Blue">Trang chủ</a>&nbsp;&nbsp;
            </td></tr>
	    </table>
	</div>


<script type="text/javascript">

    var srcCaptcha = $("#login img").attr("src");
    if (srcCaptcha.toString().indexOf("CaptchaImage.axd") != -1) {
        $("#login img").attr("src", "/" + srcCaptcha);
    }

</script>